package main.java.factory.factory_method;

public class CoffeeStore {
    private CoffeeFactory factory;


    public Coffee orderCoffee() {
        Coffee coffee = factory.createCoffee();

        if (coffee != null) {
            coffee.addMilk();
            coffee.addSugar();
        }
        return coffee;
    }

    public CoffeeFactory getFactory() {
        return factory;
    }

    public void setFactory(CoffeeFactory factory) {
        this.factory = factory;
    }

}
